
import { BrowserRouter, Route, Routes } from 'react-router';
import App from './App';
import Login from './views/Login';
import Index from './views/Indexpage';
import Indexcontent from './views/IndexContent';
import PatientRegistration from './views/PatientRegistration';
import PatientLists from './views/PatientLists';
import Parameterconfiguration from './views/Parameterconfiguration';
import Outpatientregistration from './views/Outpatientregistration';
import Registrationinquiry from './views/Registrationinquiry';
import Blacklistmanagement from './views/Blacklistmanagement';
import Doctorscheduling from './views/Doctorscheduling';
import CopyScheduling from './views/CopyScheduling';
import SchedulingSettings from './views/SchedulingSettings';
import BasicSettings from './views/BasicSettings';
import Timeperiodsetting from './views/Timeperiodsetting';
import Schedulinginquiry from './views/Schedulinginquiry';
import Patientfilingstatistics from './views/Patientfilingstatistics';
import Archivesummary from './views/Archivesummary';
import Archivedetails from './views/Archivedetails';
import Outpatientregistrationstatistics from './views/Outpatientregistrationstatistics';
import Dictionarymanaged from './views/Dictionarymanaged';
import LoginLog from './views/LoginLog';
import OperationLog from './views/OperationLog';
import PatientDetail from './views/PatientDetail';
import Registerdetails from './views/Registerdetails';
import Calendar from './views/Calendars';
import WithAuth from './components/WithAuth';
import AppProvider from './components/AppProvider';
 
function Router():JSX.Element {
    return ( 
        <AppProvider>
        <BrowserRouter>
            <Routes>
                <Route path="/" element={<App/>}></Route>
                <Route path='/login' element={<Login/>}></Route>
                <Route path='/index' element={<WithAuth><Index/></WithAuth>}>
                    <Route path='indexcontent' element={<Indexcontent/>}></Route>
                    {/* 患者登记 */}
                    <Route path='patientmangent/PatientRegistration' element={<WithAuth>
                        <PatientRegistration/>
                    </WithAuth>}></Route>
                    {/* 患者列表 */}
                    <Route path='patientmangent/PatientLists' element={<PatientLists/>}></Route>
                        {/* 患者详情 */}
                        <Route path='patientmangent/PatientLists/PatientDetail' element={<PatientDetail/>}></Route>
                    {/* 门诊挂号 */}
                    <Route path='Registrationmanagement/Outpatientregistration' element={<Outpatientregistration/>}></Route>
                    {/* 挂号查询 */}
                    <Route path='Registrationmanagement/Registrationinquiry' element={<Registrationinquiry/>}></Route>
                        {/* 挂号详情 */}
                        <Route path='Registrationmanagement/Registrationinquiry/Registerdetails' element={<Registerdetails/>}></Route>
                    {/* 黑名单管理 */}
                    <Route path='Registrationmanagement/Blacklistmanagement' element={<Blacklistmanagement/>}></Route>
                    {/* 医生排班 */}
                    <Route path='WorkforceManagement/Doctorscheduling' element={<Doctorscheduling/>}></Route>
                    {/* 复制排班 */}
                    <Route path='WorkforceManagement/CopyScheduling' element={<CopyScheduling/>}></Route>
                    {/* 排班设置 */}
                    <Route path='WorkforceManagement/SchedulingSettings' element={<SchedulingSettings/>}>
                        {/* 基础设置 */}
                        <Route path='BasicSettings' element={<BasicSettings/>}></Route>
                        {/* 排版时段设置 */}
                        <Route path='Timeperiodsetting' element={<Timeperiodsetting/>}></Route>
                    </Route>
                    {/* 排班查询 */}
                    <Route path='WorkforceManagement/Schedulinginquiry' element={<Schedulinginquiry/>}></Route>
                    {/* 患者建档统计 */}
                    <Route path='statisticsquery/Patientfilingstatistics' element={<Patientfilingstatistics/>}>
                        {/* 建档汇总 */}
                        <Route path='Archivesummary' element={<Archivesummary/>}></Route>
                        {/* 建档明细 */}
                        <Route path='Archivedetails' element={<Archivedetails/>}></Route>
                    </Route>
                    {/* 门诊挂号统计 */}
                    <Route path='statisticsquery/Outpatientregistrationstatistics' element={<Outpatientregistrationstatistics/>}></Route>
                    {/* 字典管理 */}
                    <Route path='systemmanagement/Dictionarymanaged' element={<Dictionarymanaged/>}></Route>
                    {/* 参数配置 */}
                    <Route path='systemmanagement/Parameterconfiguration' element={<Parameterconfiguration/>}></Route>
                    {/* 登录日志 */}
                    <Route path='systemmanagement/Logmanagement/LoginLog' element={<LoginLog/>}></Route>
                    {/* 操作日志 */}
                    <Route path='systemmanagement/Logmanagement/OperationLog' element={<OperationLog/>}></Route>
                    {/* 日历切换 */}
                    <Route path='calendar' element={<Calendar/>}></Route>
                </Route>
                {/* 你可以添加更多的路由 */}
            </Routes>
        </BrowserRouter>
        </AppProvider>
     );
}

export default Router;



 